@echo off
set CURRENT_DATE_STRING=%date:~0,4%%date:~5,2%%date:~8,2%
echo CURRENT_DATE_STRING=%CURRENT_DATE_STRING%

set hour=%time:~0,2%
::replace leading space with 0 for hours < 10
if "%hour:~0,1%" == " "  set hour=0%hour:~1,1%
set minute=%time:~3,2%
set second=%time:~6,2%
set CURRENT_TIME_STRING=%hour%%minute%%second%
echo CURRENT_TIME_STRING=%CURRENT_TIME_STRING%
set CURRENT_DATE_TIME_STRING=%CURRENT_DATE_STRING%_%CURRENT_TIME_STRING%
echo CURRENT_DATE_TIME_STRING=%CURRENT_DATE_TIME_STRING%

ielftool.exe --srec --srec-len 32 ../OLD_WL_APP/OLD_WL_APP.axf ./OLD_WL_APP_%CURRENT_DATE_TIME_STRING%.S
